<extend name="layout/edit" />

<block name="HEADER">

</block>

<block name="CONTENT">
    <control:form id="form"/>
</block>

<block name="FOOTER">
   <script type="text/javascript">
    var  page=(function(ns){
    	
		ns.init = function(){
			form.$files['file'].uploadSuccess(function(res){
				form.setValue('download_url',res.data.src);
			});
		}
		
        //保存
        ns.save=function(){
        	form.save(1).then(function(){
        		form.opener.$.toast(1,'成功！');
        		form.opener.grid.load();
        	});
        }
        
        return ns;
    }({}));
    
    $(function(){ page.init(); });
   </script>
</block>



